#include <iostream>
#include <cmath>
using namespace std;

int f(int n)
{
	if (n == 1 || n == 0)
		return 1;
	else 
		return n * f(n - 1);

}

int main(){
	int a;
	cout<<"Please input a number:";
	cin>>a;
        cout<<f(a)<<endl;	
	return 0;
}
